<?php
$this->headTitle($this->translate('Image index'));
$this->headScript()
    ->appendScript('
$(function(){
    $("map area").mouseover(function(){
        //alert($(this).css("top"));
        $(this).next("div.tip").slideDown(300)
        .siblings().fadeOut();
    });
    $("map area").mouseout(function(){
        $(this).next("div.tip").fadeOut();
    });
});
');
$this->headStyle('
.zend_form fieldset{
    padding-top: 0;
}
.map{
    width:880px;
    padding-top: 46px;
    overflow:hidden;
}
.tip{background: none repeat scroll 0 0 white;
    border: 5px solid #B9DDFE;
    font-size: 14px;
    width: 160px;
    left: 500px;
    position: absolute;
    top: 300px;
    display:none;
    overflow:hidden;
}
.tip pre{
    border:1px dashed #D6D6D6;
    padding: 10px 10px;margin:0;
}
');
?>

<h2>
    <span>查看街道办事处</span>
</h2>

<dl class="zend_form">
<dt>&nbsp;</dt>
<dd>
<fieldset>
    <legend>查看办事处</legend>
    
    <div class="map">
    <img src="<?php echo $this->STATIC_URL?>/styles/people/images/map.jpg" border="0" usemap="#Map" />
    <map name="Map" id="Map">
<?php foreach ($this->entries as $street): ?>
    <area shape="rect" coords="<?php echo $street->area?>"
     href="<?php echo $this->url(array('action'=> 'street', 'sid'=> $street->sid))?>" />
    <div class="tip"><pre><h2><?php echo $street->name?></h2><p><?php echo$street->intro?></p></pre></div>
<?php endforeach;?>
    </map>
    </div>
</fieldset>
</dd>
</dl>